package day1_12.FirstPhase.ObjectOriented.Advanced.staticdemo;

public class Student {
    private String name;
    private int age;
    private String gender;
    // static 修饰的变量是静态变量,每个对象共有,调用方式可以用类名调用
    public static String teacher;

    public Student() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Student(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }
    // 行为
    public void study(){
        System.out.println(name + " is studying");
    }

    public void show(){
        System.out.println(name + ", " + age + ", " + gender + "," + teacher);
    }
}
